<html>

<head>
<meta charset="UTF-8">
<title>添加职位</title>
</head>
<body>
	<link rel="stylesheet" type="text/css" href="/css/form.css">
	<script type="text/javascript" src="/js/user_manage.js"></script>
	<script type="text/javascript">
		$(".navigation span:first").text("查看职位");
	</script>
	<#include "/head.ftl"/>
	<div class="content">
		<div class="tab">
			<div class="tab-header">
				<a title="返回" class="btn btn-setting" onclick="back(this)">
					<i class="iconfont icon-undo"></i>
				</a> <a title="刷新" class="btn btn-setting" onclick="refresh(this)">
					<i class="iconfont icon-refresh"></i>
				</a> 
			</div>
			<div class="form-content">
				<form id="officeForm" method="post" data-id="${RequestParameters.id}">
					<fieldset>
						<table>
							<tr>
								<td>职位名称：</td>
								<td><input type="text" name="name" placeholder="职位名称不大于10个字符" maxlength="10" value="${(office.name)?default('')}"></td>
							</tr>
							<tr>
								<td>所属部门：</td>
								<td>
									<select name="dept">
										<#list depts as ds>
											<#if ds.id==RequestParameters.id?number>
												<option value="${ds.id}" selected="selected">${ds.name}</option>
												<#else>
												<option value="${ds.id}">${ds.name}</option>
											</#if>
										</#list>
									</select>
								</td>
							</tr>
							<tr>
								<td>岗位薪酬：</td>
								<td><input type="text" name="salBase" placeholder="最多保留两位小数"  value="${(office.salBase)?default('')}"></td>
							</tr>
							<tr>
								<td>直属上司：</td>
								<td>
									部门-<select name="depts" onchange="changeOffice(this)">
											<option value="">无</option>
											<#list depts as ds>
												<#if ds.id==RequestParameters.id?number>
													<option value="${ds.id}" selected="selected">${ds.name}</option>
													<#else>
													<option value="${ds.id}">${ds.name}</option>
												</#if>
											</#list>
									</select>
									职位-<select name="leader">
										<#list offices as os>
											<option value="">-选择职业-</option>
											<#if office?? && office.id==os.id>
												<option value="${os.id}" selected="selected">${os.name}</option>
												<#else>
												<option value="${os.id}">${os.name}</option>
											</#if>
										</#list>
									</select>
								</td>
							</tr>
							<tr>
								<td style="text-align: center;" colspan="2">
									<input type="hidden" name="id" value="${(office.id)?default('')}">
									<input class="button bgColor-green2"style="padding: 11px 40px;" type="submit" value="保存">
								</td>
							</tr>
						</table>
					</fieldset>
				</form>
			</div>
		</div>

	</div>
</body>
</html>